package ${packages.fiscoConfig};

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

import java.util.List;

@Configuration
@ConfigurationProperties(prefix = "fisco")
@Data
public class FiscoProperties {

    private Network network = new Network();

    private Crypto crypto = new Crypto();

    private Account account = new Account();

    private Contract contract = new Contract();

    @Data
    public static class Network {
        private List<String> peers;
        private int groupId = 1;
    }

    @Data
    public static class Crypto {
        private String certPath = "src/main/resources/conf";
        private boolean useSmCrypto = false;
    }

    @Data
    public static class Account {
        private String hexPrivateKey = "";
    }

    @Data
    public static class Contract {
        private String name = "AssetContract";
        private String address = "";
        private String abiPath = "abi";
        private String binPath = "bin";
    }
}
